d = {1001: '小红', 1002: '小梅', 1003: '小花'}

d[1004] = '小明'

keys = d.keys()
print(keys)
print(list(keys))
print(tuple(keys))

values = d.values()
print(values)
print(list(values))
print(tuple(values))

print('-'*40)

lst = list(d.items())
print(lst)

d = dict(lst)
print('===>', d)

print('-'*40)
print(d.pop(1001))
print(d.pop(1008, '不存在'))
print('===>', d)

print(d.popitem())
print('===>', d)

d.clear()
print('===>', d)
print(bool(d))
